
/* from: http://desandro.github.com/3dtransforms */

.card {
  width: 200px;
  height: 260px;
  position: relative;
  perspective: 800;
}

.card .wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  -webkit-transform-style: preserve-3d;
  -moz-transform-style: preserve-3d;
  -webkit-transition: -webkit-transform 500ms ease-in-out;
  -moz-transition: -moz-transform 500ms ease-in-out;
  border: 1px solid #eee;
  border-bottom-color: #cacaca;
  border-radius: 3px;
  -webkit-box-shadow: inset 0 -1px 0 0 white, 0 1px 4px 0 #ddd;
  -moz-box-shadow: inset 0 -1px 0 0 white, 0 1px 4px 0 #ddd;
}

.card .face {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
}

.card .back {
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
}

.card.flipped .wrapper {
  -webkit-transform: rotateY(180deg);
  -moz-transform: rotateY(180deg);
}

/* sideflip effect */

.card.sideflip .wrapper {
  -webkit-transform-origin: right center;
  -moz-transform-origin: right center;
}

.card.sideflip.flipped .wrapper {
  -webkit-transform: translateX(-100%) rotateY(180deg);
  -moz-transform: translateX(-100%) rotateY(180deg);
}